import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        username: '',
        menuCatalog: 2
    },
    mutations: {
        setUserName(state, username) {
            state.username = username
        },
        setMenuCatalog(state,menuCatalog){
            state.menuCatalog = menuCatalog
        }
    },
    getters: {
        getUserName: state => state.username,
        getMenuCatalog: state => state.menuCatalog
    },
    actions: {},
    modules: {}
})
